package com.he.demo.log;

import cn.hutool.json.JSONConfig;
import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;

import java.util.Objects;

/**
 * @author heyanjing
 * date:2022-04-19 2022/4/19:23:30
 */
@Slf4j
public class Log {
    public static void info(Object[] objects) {
        if (Objects.nonNull(objects) && objects.length > 0) {
            Object object = objects[0];
            log.info("{}", JSONUtil.toJsonStr(JSONUtil.parse(object, JSONConfig.create().setDateFormat("yyyy-MM-dd HH:mm:ss").setOrder(true))));
        }
    }
}
